home *** CD-ROM | disk | FTP | other *** search
/ BBS in a Box 7 / BBS in a Box - Macintosh - Volume VII (BBS in a Box) (January 1993).iso / Files / Hyper / N-O / OffsetFrom XFCN.cpt / OffsetFrom XFCN / cards.xml < prev    next >
Text File  |  1992-05-04  |  10KB  |  265 lines

  1. card_3014.xml
  2. <?xml version="1.0" encoding="utf-8" ?>
  3. <!DOCTYPE card PUBLIC "-//Apple, Inc.//DTD card V 2.0//EN" "" >
  4. <card>
  5.     <id>3014</id>
  6.     <filler1>0</filler1>
  7.     <bitmap>BMAP_4023.pbm</bitmap>
  8.     <cantDelete> <false /> </cantDelete>
  9.     <showPict> <true /> </showPict>
  10.     <dontSearch> <false /> </dontSearch>
  11.     <owner>2807</owner>
  12.     <link rel="stylesheet" type="text/css" href="stylesheet_3083.css" />
  13.     <part>
  14.         <id>1</id>
  15.         <type>button</type>
  16.         <visible> <true /> </visible>
  17.         <reserved5> 0 </reserved5>
  18.         <reserved4> 0 </reserved4>
  19.         <reserved3> 0 </reserved3>
  20.         <reserved2> 0 </reserved2>
  21.         <reserved1> 0 </reserved1>
  22.         <enabled> <true /> </enabled>
  23.         <rect>
  24.             <left>37</left>
  25.             <top>272</top>
  26.             <right>150</right>
  27.             <bottom>305</bottom>
  28.         </rect>
  29.         <style>roundrect</style>
  30.         <showName> <true /> </showName>
  31.         <highlight> <false /> </highlight>
  32.         <autoHighlight> <true /> </autoHighlight>
  33.         <sharedHighlight> <true /> </sharedHighlight>
  34.         <family>0</family>
  35.         <titleWidth>0</titleWidth>
  36.         <icon>0</icon>
  37.         <textAlign>center</textAlign>
  38.         <font>Chicago</font>
  39.         <textSize>12</textSize>
  40.         <textStyle>plain</textStyle>
  41.         <name>OffsetFrom()</name>
  42.         <script>on Mouseupput cd fld "String" into stringput cd fld "Container" into containerput cd fld "Start Point" into startpointget OffsetFrom(string,container,startpoint,hilite of cd btn "Case Sensitive")if it contains "Error" thenbeepanswer itelseput it into cd fld "returned value"end ifend Mouseup</script>
  43.     </part>
  44.     <part>
  45.         <id>3</id>
  46.         <type>field</type>
  47.         <visible> <true /> </visible>
  48.         <dontWrap> <false /> </dontWrap>
  49.         <dontSearch> <false /> </dontSearch>
  50.         <sharedText> <false /> </sharedText>
  51.         <fixedLineHeight> <false /> </fixedLineHeight>
  52.         <autoTab> <false /> </autoTab>
  53.         <lockText> <false /> </lockText>
  54.         <rect>
  55.             <left>259</left>
  56.             <top>171</top>
  57.             <right>484</right>
  58.             <bottom>272</bottom>
  59.         </rect>
  60.         <style>scrolling</style>
  61.         <autoSelect> <false /> </autoSelect>
  62.         <showLines> <false /> </showLines>
  63.         <wideMargins> <false /> </wideMargins>
  64.         <multipleLines> <false /> </multipleLines>
  65.         <reservedFamily> 0 </reservedFamily>
  66.         <titleWidth>0</titleWidth>
  67.         <icon>0</icon>
  68.         <textAlign>left</textAlign>
  69.         <font>Geneva</font>
  70.         <textSize>9</textSize>
  71.         <textStyle>plain</textStyle>
  72.         <textHeight>12</textHeight>
  73.         <name>Container</name>
  74.         <script></script>
  75.     </part>
  76.     <part>
  77.         <id>6</id>
  78.         <type>field</type>
  79.         <visible> <true /> </visible>
  80.         <dontWrap> <false /> </dontWrap>
  81.         <dontSearch> <false /> </dontSearch>
  82.         <sharedText> <false /> </sharedText>
  83.         <fixedLineHeight> <false /> </fixedLineHeight>
  84.         <autoTab> <false /> </autoTab>
  85.         <lockText> <false /> </lockText>
  86.         <rect>
  87.             <left>36</left>
  88.             <top>45</top>
  89.             <right>480</right>
  90.             <bottom>135</bottom>
  91.         </rect>
  92.         <style>scrolling</style>
  93.         <autoSelect> <false /> </autoSelect>
  94.         <showLines> <false /> </showLines>
  95.         <wideMargins> <false /> </wideMargins>
  96.         <multipleLines> <false /> </multipleLines>
  97.         <reservedFamily> 0 </reservedFamily>
  98.         <titleWidth>0</titleWidth>
  99.         <icon>0</icon>
  100.         <textAlign>left</textAlign>
  101.         <font>Geneva</font>
  102.         <textSize>9</textSize>
  103.         <textStyle>plain</textStyle>
  104.         <textHeight>12</textHeight>
  105.         <name>Info</name>
  106.         <script></script>
  107.     </part>
  108.     <part>
  109.         <id>7</id>
  110.         <type>field</type>
  111.         <visible> <true /> </visible>
  112.         <dontWrap> <false /> </dontWrap>
  113.         <dontSearch> <false /> </dontSearch>
  114.         <sharedText> <false /> </sharedText>
  115.         <fixedLineHeight> <false /> </fixedLineHeight>
  116.         <autoTab> <false /> </autoTab>
  117.         <lockText> <false /> </lockText>
  118.         <rect>
  119.             <left>38</left>
  120.             <top>170</top>
  121.             <right>168</right>
  122.             <bottom>190</bottom>
  123.         </rect>
  124.         <style>shadow</style>
  125.         <autoSelect> <false /> </autoSelect>
  126.         <showLines> <false /> </showLines>
  127.         <wideMargins> <false /> </wideMargins>
  128.         <multipleLines> <false /> </multipleLines>
  129.         <reservedFamily> 0 </reservedFamily>
  130.         <titleWidth>0</titleWidth>
  131.         <icon>0</icon>
  132.         <textAlign>left</textAlign>
  133.         <font>Geneva</font>
  134.         <textSize>9</textSize>
  135.         <textStyle>plain</textStyle>
  136.         <textHeight>12</textHeight>
  137.         <name>String</name>
  138.         <script></script>
  139.     </part>
  140.     <part>
  141.         <id>8</id>
  142.         <type>field</type>
  143.         <visible> <true /> </visible>
  144.         <dontWrap> <false /> </dontWrap>
  145.         <dontSearch> <false /> </dontSearch>
  146.         <sharedText> <false /> </sharedText>
  147.         <fixedLineHeight> <false /> </fixedLineHeight>
  148.         <autoTab> <false /> </autoTab>
  149.         <lockText> <false /> </lockText>
  150.         <rect>
  151.             <left>38</left>
  152.             <top>214</top>
  153.             <right>168</right>
  154.             <bottom>234</bottom>
  155.         </rect>
  156.         <style>shadow</style>
  157.         <autoSelect> <false /> </autoSelect>
  158.         <showLines> <false /> </showLines>
  159.         <wideMargins> <false /> </wideMargins>
  160.         <multipleLines> <false /> </multipleLines>
  161.         <reservedFamily> 0 </reservedFamily>
  162.         <titleWidth>0</titleWidth>
  163.         <icon>0</icon>
  164.         <textAlign>left</textAlign>
  165.         <font>Geneva</font>
  166.         <textSize>9</textSize>
  167.         <textStyle>plain</textStyle>
  168.         <textHeight>12</textHeight>
  169.         <name>Start Point</name>
  170.         <script></script>
  171.     </part>
  172.     <part>
  173.         <id>9</id>
  174.         <type>button</type>
  175.         <visible> <true /> </visible>
  176.         <reserved5> 0 </reserved5>
  177.         <reserved4> 0 </reserved4>
  178.         <reserved3> 0 </reserved3>
  179.         <reserved2> 0 </reserved2>
  180.         <reserved1> 0 </reserved1>
  181.         <enabled> <true /> </enabled>
  182.         <rect>
  183.             <left>111</left>
  184.             <top>243</top>
  185.             <right>130</right>
  186.             <bottom>261</bottom>
  187.         </rect>
  188.         <style>checkbox</style>
  189.         <showName> <false /> </showName>
  190.         <highlight> <false /> </highlight>
  191.         <autoHighlight> <true /> </autoHighlight>
  192.         <sharedHighlight> <true /> </sharedHighlight>
  193.         <family>0</family>
  194.         <titleWidth>0</titleWidth>
  195.         <icon>0</icon>
  196.         <textAlign>center</textAlign>
  197.         <font>Chicago</font>
  198.         <textSize>12</textSize>
  199.         <textStyle>plain</textStyle>
  200.         <name>Case Sensitive</name>
  201.         <script></script>
  202.     </part>
  203.     <part>
  204.         <id>11</id>
  205.         <type>field</type>
  206.         <visible> <true /> </visible>
  207.         <dontWrap> <false /> </dontWrap>
  208.         <dontSearch> <false /> </dontSearch>
  209.         <sharedText> <false /> </sharedText>
  210.         <fixedLineHeight> <false /> </fixedLineHeight>
  211.         <autoTab> <false /> </autoTab>
  212.         <lockText> <false /> </lockText>
  213.         <rect>
  214.             <left>260</left>
  215.             <top>278</top>
  216.             <right>390</right>
  217.             <bottom>298</bottom>
  218.         </rect>
  219.         <style>shadow</style>
  220.         <autoSelect> <false /> </autoSelect>
  221.         <showLines> <false /> </showLines>
  222.         <wideMargins> <false /> </wideMargins>
  223.         <multipleLines> <false /> </multipleLines>
  224.         <reservedFamily> 0 </reservedFamily>
  225.         <titleWidth>0</titleWidth>
  226.         <icon>0</icon>
  227.         <textAlign>left</textAlign>
  228.         <font>Geneva</font>
  229.         <textSize>9</textSize>
  230.         <textStyle>plain</textStyle>
  231.         <textHeight>12</textHeight>
  232.         <name>Returned Value</name>
  233.         <script></script>
  234.     </part>
  235.     <content>
  236.         <layer>card</layer>
  237.         <id>6</id>
  238.         <text><span class="style1">his stack contains a HyperCard XFCN that returns the offset of a string within a container from a user specified starting point within that container.</span><span class="style2">OffsetFrom</span><span class="style1">This function takes four parameters. Only the first two are essential. The first parameter is the string to search for. The second parameter is the container to search in. The third parameter is the optional starting point within that container. The fourth parameter is an optional case-sensitive flag that defaults to true.</span><span class="style2">Example</span><span class="style1">The script           put OffsetFrom ("card","A Hypercard birthday card",10,false)returns           22,25,12,15where:            Item 1 of the returned string is the offset of the first character in the string from               the start of the container             Item 2 of the returned string is the offset of the last character in the string from              the start of the container.            Item 3 of the returned string is the offset of the first character in the string from              the user specified start point within the container.            Item 4 of the returned string is the offset of the last character in the string from              the  user specified start point within the container. If the string is not found within the container a value of 0 (zero) is returned.</span><span class="style2">Error messages</span><span class="style1">If the optional third parameter is not a number between 1 and 30000 an "Invalid start value" error is returned.HyperCard will return an error if it does not recognize the second paramter as a valid container.</span><span class="style2">Copyright</span><span class="style1">The OffsetFrom XFCN is ¬© Copyright 1992 - Barry Dobson - </span><span class="style2">workingweekend productions</span><span class="style1">. This external is freeware for non-commercial use and may be used in any non-commercial stack.Please feel free to contact me with any comments. I can be reached via any of the following e-mail addresses. Have fun!</span><span class="style2">                                    workingweekend productions</span><span class="style1">        c/o AppleLink: QUOIN.PUB  ‚Ä¢  CompuServe: 70751,1177  ‚Ä¢  America Online: Quoin</span></text>
  239.     </content>
  240.     <content>
  241.         <layer>background</layer>
  242.         <id>1</id>
  243.         <text><span class="style3">ickory, dickory dock.The mouse ran up the clock.The clock struck one, the mouse ran down.Hickory, dickory dock.</span></text>
  244.     </content>
  245.     <content>
  246.         <layer>card</layer>
  247.         <id>7</id>
  248.         <text>hickory</text>
  249.     </content>
  250.     <content>
  251.         <layer>card</layer>
  252.         <id>3</id>
  253.         <text>Hickory, dickory dock.The mouse ran up the clock.The clock struck one, the mouse ran down.Hickory, dickory dock.</text>
  254.     </content>
  255.     <content>
  256.         <layer>card</layer>
  257.         <id>8</id>
  258.         <text>1</text>
  259.     </content>
  260.     <name></name>
  261.     <script>on CloseCardset the scroll of cd fld "Info" to 0put background fld 1 into cd fld "container"put "hickory" into cd fld "String"put "1" into cd fld "Start Point"put empty into cd fld "Returned Value"set the hilite of cd btn "Case Sensitive" to falseend CloseCard</script>
  262. </card>
  263.  
  264.  
  265.